import request from '@/axios';

export const startList = (current, size, params) => request({
  url: '/zzy-flow/work/start-list',
  method: 'get',
  params: {
    ...params,
    current,
    size,
  },
});

export const claimList = (current, size, params) => request({
  url: '/zzy-flow/work/claim-list',
  method: 'get',
  params: {
    ...params,
    current,
    size,
  },
});

export const todoList = (current, size, params) => request({
  url: '/zzy-flow/work/todo-list',
  method: 'get',
  params: {
    ...params,
    current,
    size,
  },
});

export const sendList = (current, size, params) => request({
  url: '/zzy-flow/work/send-list',
  method: 'get',
  params: {
    ...params,
    current,
    size,
  },
});

export const doneList = (current, size, params) => request({
  url: '/zzy-flow/work/done-list',
  method: 'get',
  params: {
    ...params,
    current,
    size,
  },
});

export const claimTask = taskId => request({
  url: '/zzy-flow/work/claim-task',
  method: 'post',
  params: {
    taskId,
  },
});

export const completeTask = data => request({
  url: '/zzy-flow/work/complete-task',
  method: 'post',
  data,
});
